# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataproc.V1.Model.TaskMetrics do
  @moduledoc """
  Executor Task Metrics

  ## Attributes

  *   `diskBytesSpilled` (*type:* `String.t`, *default:* `nil`) - 
  *   `executorCpuTimeNanos` (*type:* `String.t`, *default:* `nil`) - 
  *   `executorDeserializeCpuTimeNanos` (*type:* `String.t`, *default:* `nil`) - 
  *   `executorDeserializeTimeMillis` (*type:* `String.t`, *default:* `nil`) - 
  *   `executorRunTimeMillis` (*type:* `String.t`, *default:* `nil`) - 
  *   `inputMetrics` (*type:* `GoogleApi.Dataproc.V1.Model.InputMetrics.t`, *default:* `nil`) - 
  *   `jvmGcTimeMillis` (*type:* `String.t`, *default:* `nil`) - 
  *   `memoryBytesSpilled` (*type:* `String.t`, *default:* `nil`) - 
  *   `outputMetrics` (*type:* `GoogleApi.Dataproc.V1.Model.OutputMetrics.t`, *default:* `nil`) - 
  *   `peakExecutionMemoryBytes` (*type:* `String.t`, *default:* `nil`) - 
  *   `resultSerializationTimeMillis` (*type:* `String.t`, *default:* `nil`) - 
  *   `resultSize` (*type:* `String.t`, *default:* `nil`) - 
  *   `shuffleReadMetrics` (*type:* `GoogleApi.Dataproc.V1.Model.ShuffleReadMetrics.t`, *default:* `nil`) - 
  *   `shuffleWriteMetrics` (*type:* `GoogleApi.Dataproc.V1.Model.ShuffleWriteMetrics.t`, *default:* `nil`) - 
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :diskBytesSpilled => String.t() | nil,
          :executorCpuTimeNanos => String.t() | nil,
          :executorDeserializeCpuTimeNanos => String.t() | nil,
          :executorDeserializeTimeMillis => String.t() | nil,
          :executorRunTimeMillis => String.t() | nil,
          :inputMetrics => GoogleApi.Dataproc.V1.Model.InputMetrics.t() | nil,
          :jvmGcTimeMillis => String.t() | nil,
          :memoryBytesSpilled => String.t() | nil,
          :outputMetrics => GoogleApi.Dataproc.V1.Model.OutputMetrics.t() | nil,
          :peakExecutionMemoryBytes => String.t() | nil,
          :resultSerializationTimeMillis => String.t() | nil,
          :resultSize => String.t() | nil,
          :shuffleReadMetrics => GoogleApi.Dataproc.V1.Model.ShuffleReadMetrics.t() | nil,
          :shuffleWriteMetrics => GoogleApi.Dataproc.V1.Model.ShuffleWriteMetrics.t() | nil
        }

  field(:diskBytesSpilled)
  field(:executorCpuTimeNanos)
  field(:executorDeserializeCpuTimeNanos)
  field(:executorDeserializeTimeMillis)
  field(:executorRunTimeMillis)
  field(:inputMetrics, as: GoogleApi.Dataproc.V1.Model.InputMetrics)
  field(:jvmGcTimeMillis)
  field(:memoryBytesSpilled)
  field(:outputMetrics, as: GoogleApi.Dataproc.V1.Model.OutputMetrics)
  field(:peakExecutionMemoryBytes)
  field(:resultSerializationTimeMillis)
  field(:resultSize)
  field(:shuffleReadMetrics, as: GoogleApi.Dataproc.V1.Model.ShuffleReadMetrics)
  field(:shuffleWriteMetrics, as: GoogleApi.Dataproc.V1.Model.ShuffleWriteMetrics)
end

defimpl Poison.Decoder, for: GoogleApi.Dataproc.V1.Model.TaskMetrics do
  def decode(value, options) do
    GoogleApi.Dataproc.V1.Model.TaskMetrics.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataproc.V1.Model.TaskMetrics do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
